1. Field of the Invention
The present invention generally relates to graphics data processing and more specifically to processing multiple graphics contexts simultaneously and allocating graphics processing units among the multiple graphics contexts.
2. Description of the Related Art
Current graphics processing systems maintain state information for a single processing context. A processing context consists of a complete set of rendering state through the entire graphics pipeline. Many programs running on a CPU will need only one processing context for all their graphics, although some programs might use multiple processing contexts. For example, a program may use one context for each window or one context for graphics and another context to run computing applications on a graphics processor. As more application programs use the graphics processing system to perform graphics processing, it is necessary to switch between the different contexts that correspond to each application program. As the capabilities of the graphics processing systems have increased, the complexity and execution time for the graphics processing programs has also increased. Therefore, the amount of active state information that is maintained within the graphics processing system has also increased.
In order to complete a context switch, the active state information is saved in memory and new state for a different context is loaded into the graphics processing system and processing is resumed using the new state. The time needed to unload and load the active state information reduces the processing throughput since the graphics processing system is unavailable during the unloading and loading operations. In some cases, the unloading and loading operation may take as long as 500 microseconds. When each context requires a small amount of graphics processing, the context switching time may exceed the time spent processing data. Alternatively, the graphics processing pipeline may be drained to idle the pipeline, so that the size of the active state information is minimized. However, some graphic pipelines may be very deep, i.e., have a high latency, and require too long to drain, necessitating a costly active context switch to change to a different context without draining the pipeline.
Accordingly, what is needed in the art is a system and method for improving processing throughput when multiple graphics contexts are processed.